package top.lixunda.ecommerce.server.good.api.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import top.lixunda.commerce.common.core.entity.MessageObject;
import top.lixunda.common.validate.XumValid;
import top.lixunda.ecommerce.server.business.api.entity.dto.PageConvertDTO;
import top.lixunda.ecommerce.server.good.api.entity.db.OrderReviewDO;
import top.lixunda.ecommerce.server.good.api.entity.db.OrderReviewDetailDO;
import top.lixunda.ecommerce.server.good.api.entity.dto.OrderReviewDetailQueryDTO;
import top.lixunda.ecommerce.server.good.api.entity.vo.OrderReviewConvertVO;

import java.util.List;

/**
 * 订单评价相关查询
 *
 * @author lixunda
 * @version time:2020/3/8 9:58
 */
@SuppressWarnings("unused")
@Api("订单评价相关查询")
@RequestMapping("/order-review-detail")
public interface IOrderReviewDetailController {

    /**
     * 根据id查询评论信息详情
     *
     * @param id 评论id
     * @return 评论信息详细信息
     */
    @ApiOperation("根据id查询评论信息详情")
    @GetMapping("queryOrderReviewById")
    MessageObject<OrderReviewConvertVO> queryOrderReviewById(@RequestParam("id") Integer id);

    /**
     * 根据id查询评论信息详情
     *
     * @param ids 评论id
     * @return 评论信息详细信息
     */
    @ApiOperation("根据id查询评论信息详情")
    @PostMapping("queryOrderReviewByIds")
    MessageObject<List<OrderReviewConvertVO>> queryOrderReviewByIds(@RequestBody List<Integer> ids);

    /**
     * 分页条件查询
     *
     * @param pageConvertDTO 分页条件查询DTO
     * @return 分页数据
     */
    @ApiOperation("分页条件查询")
    @PostMapping("queryOrderReviewByPageWrapper")
    MessageObject<IPage<OrderReviewConvertVO>> queryOrderReviewByPageWrapper(
            @RequestBody @XumValid PageConvertDTO<OrderReviewDO, OrderReviewDetailDO, OrderReviewDetailQueryDTO> pageConvertDTO);

}
